<template>
   <e-charts :option="option" autoresize />
</template>

<script>
export default {
  props: {
    value: Array
  },
  computed:{
    option(){
      return{
            xAxis: {
              type:"category",
              data: this.value.map(item => item.name)
            },
            yAxis: {
              type:"value",
            },
            series: [
              {
                type: "bar",
                data: this.value.map(item => item.value),
              },
            ],
      }
    }
  },
  data() {
    return {

    };
  },
};
</script>